package bavaria.hightech.accounting;

import java.util.Comparator;

import bavaria.hightech.banking.Money;

public  class MoneyComparator implements Comparator {

	@Override
	public int compare(Object o1, Object o2) {
		Money m1 = ((Accounting)o1).getMoney();
		Money m2 = ((Accounting)o2).getMoney();
		
		if(m1.isGreater(m2)) return 1;
		else if(m1.equals(m2)) return 0;
		else return -1;
	}

}
